<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.js" type="application/javascript"></script>
</head>
<body>
  <div id="app">
    <el-input :value="username" :disabled="isdisable" type="password"></el-input>
  </div>
</body>
<script>
  //(1)不用它,竞争对手就是props
  // /(2)对比props步骤少,props功能更多
  // (3)只有它,并且和v-bind结合在一起,父组件可以完全控制子组件属性
  Vue.component('el-input', {
    template: `
      <input v-bind="$attrs"></input>
    `
  })
  new Vue({
    data() {
      return {
        username:'zs', //定义数据
        isdisable:true
      }
    },
    el: '#app'
  })
</script>
</html>
